import java.sql.*;
import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        try (Connection conn=DBUtils.getConn();){
            Statement st=conn.createStatement();
            String str="select *from myemp";
            ResultSet rs=st.executeQuery(str);
            while (rs.next()){
                int id=rs.getInt(1);
                String name=rs.getString(2);
                String job=rs.getString(3);
                int sal=rs.getInt(4);
                System.out.println(id+":"+name+":"+job+":"+sal);
            }
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }

    }
}
